package _2观察者模式.Observable抽象类的使用;

import javax.swing.*;
import java.awt.*;

public class Application extends JFrame {
    Application(){
        InputTextSubject inputText = new InputTextSubject();
        ShowWord showWord = new ShowWord(inputText);
        setLayout(new FlowLayout());
        add(new JScrollPane(inputText.getText()));
        add(showWord);
        setBounds(20,20,400,300);
        setVisible(true);
        setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    }

    public static void main(String[] args) {
       new Application();
    }
}
